<template>
  <div class="container">
    <el-form ref="form" :model="form" label-width="80px">

      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="储位名称">
            <el-input v-model="form.positionName"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="仓库备注">
            <el-input v-model="form.remark"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="5">
          <el-form-item label="控制数量">
            <el-switch v-model="form.isControllerCount"></el-switch>
          </el-form-item>
        </el-col>
        <el-col :span="7">
          <el-form-item label="存储单位">
            <el-select v-model="form.unit" placeholder="请选择">
              <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>

        </el-col>
        <el-col :span="6">
          <el-form-item label="存储量">
            <el-input-number v-model="form.maxCount" :step="0.1" :max="9999999" :disabled="!form.isControllerCount"></el-input-number>
          </el-form-item>
        </el-col>

      </el-row >
      <el-row type="flex">
        <el-col>
          <el-form-item label="储位分类">
            <el-select v-model="form.positionType" placeholder="请选择">
              <el-option
                  v-for="item in classifyList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="18">
          <el-form-item label="储位条码">
            <el-input v-model="form.positionBarCod"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="是否启用">
            <el-switch v-model="form.status"></el-switch>
          </el-form-item>
        </el-col>
      </el-row>






      <el-form-item>
        <el-button type="primary">确认添加</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "updateposition",
  data(){
    return{
      warehouseAreaId:'',
      form:{
        positionName:'',
        remark:'',
        maxCount:0,
        status:false,
        isControllerCount:false,
        positionBarCod:'',
        unit:'',
        positionType:'',
        warehouseAreaId:''
      },
      classifyList:[],
      options:[
        {
          label:'克',
          value: '克'
        },
        {
          label:'千克',
          value:'千克',
        },
        {
          label: '包',
          value: '包'
        },
        {
          value: '部',
          label: '部'
        }, {
          value: '件',
          label: '件'
        }, {
          value: '个',
          label: '个'
        }
       ,
        {
          value: '箱',
          label: '箱'
        },
        {
          value: '瓶',
          label: '瓶'
        }
      ]
    }
  },
  //回显数据
  mounted() {

  }
}
</script>

<style scoped>

</style>